package com.boarsoft.boar.sys.entity;

import java.util.ArrayList;
import java.util.List;

import com.boarsoft.bean.User;
import com.boarsoft.boar.common.Logon;

public class SysUser extends User implements java.io.Serializable {
	private static final long serialVersionUID = -6132883445280909091L;

	/**  */
	public static final String ADMIN_ID = "00000000000000000000000000000000";

	/** 所属公司 */
	protected String corpId;
	/** 所属部门 */
	protected String deptId;
	/** 职位 */
	protected String position;
	/** 自定义员工类型，如：0：试用账号、1：普通账号、2：超级管理员、3：API账号 */
	protected short type;
	/** 备注 */
	protected String memo;
	/** 角色 */
	protected List<SysRole> roles = new ArrayList<SysRole>();

	public Logon toLogon() {
		Logon o = new Logon();
		o.setCorpId(corpId);
		o.setDeptId(deptId);
		o.setEmail(email);
		o.setId(id);
		o.setCode(code);
		o.setName(name);
		o.setToken(token);
		return o;
	}

	public short getType() {
		return type;
	}

	public void setType(short type) {
		this.type = type;
	}

	public String getMemo() {
		return memo;
	}

	public void setMemo(String memo) {
		this.memo = memo;
	}

	public String getCorpId() {
		return corpId;
	}

	public void setCorpId(String corpId) {
		this.corpId = corpId;
	}

	public String getDeptId() {
		return deptId;
	}

	public void setDeptId(String deptId) {
		this.deptId = deptId;
	}

	public SysUser() {
	}

	public List<SysRole> getRoles() {
		return roles;
	}

	public void setRoles(List<SysRole> roles) {
		this.roles = roles;
	}

	public String getPosition() {
		return position;
	}

	public void setPosition(String position) {
		this.position = position;
	}

}